package com.ruoyi.goods.utils;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;

public class AliOssConfig {

    public static OSS getOss() {
        String endpoint = "http://oss-cn-beijing.aliyuncs.com";
        // 阿里云主账号AccessKey拥有所有API的访问权限，风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维，请登录 https://ram.console.aliyun.com 创建RAM账号。
        String accessKeyId = "LTAI4GGMkvmLusr2kdG3fQye";
        String accessKeySecret = "RZi4rlHZJGJbs2yoyiGytRJagS4BqB";
        // 创建OSSClient实例。
        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
        return ossClient;
    }
}
